<template>
  <div class="app-container org">
    <!-- 左侧区域 -->
    <el-card style="width: 100%">
      <el-tabs v-model="activityName" class="demo-tabs">
        <el-tab-pane label="未完成" name="first">
          <isReviewed v-if="activityName == 'first'" :isOut="1" ref="isReviewedRef" />
        </el-tab-pane>
        <el-tab-pane label="已完成" name="second">
          <isReviewed v-if="activityName == 'second'" ref="isReviewedRef" :isOut="2" />
        </el-tab-pane>
      </el-tabs>
    </el-card>
    <el-dialog :class="'el-dialog-theme3'" append-to-body draggable :close-on-click-modal="false"
      v-model="open" @close="closedDialog" :title="title">
      <p class="pinformation">操作</p>
      <el-form :model="form" ref="formRef" :rules="rules" label-width="110">
        <el-row>
          <el-col :span="16">
            <el-form-item label="实际发放方式：" prop="bzwzHandleId">
              <el-select style="width: 100%" v-model="form.bzwzHandleId" placeholder="请选择实际发放方式" clearable>
                <el-option label="自取" :value="1" />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-button type="success" style="margin-left: 10px;">发放</el-button>
            <el-button type="success" style="margin-left: 10px;">转办</el-button>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="16">
            <el-form-item label="取报告人电话：" prop="bzwzHandleId1">
              <el-input v-model="form.bzwzHandleId1" placeholder="请输入取报告人电话" clearable>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-button type="success" style="margin-left: 10px;">发送签字通知</el-button>
          </el-col>
        </el-row>
        <el-row style="margin-bottom: 5px; margin-top: 5px">
          <p class="pinformation">文件名称</p>
          <p class="totalStyle">共 {{ form.fileList.length }} 条数据</p>
          <el-button style="margin-left: 10px; padding-bottom: 7px" link icon="plus">新增</el-button>
        </el-row>
        <el-table :data="form.fileList" class="business" border ref="fileTableRef">
          <el-table-column label="文件名称" align="center" prop="fileCode" />
          <el-table-column label="上传时间" align="center" prop="fileCode" />
          <el-table-column prop label="操作" align="center">
            <template #default="scope">
              <el-button link type="success">查看</el-button>
              <el-button link type="success">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-form>
    </el-dialog>
  </div>
</template>

<script setup name="ReportDistribution">
import isReviewed from "./components/isReviewed";
const { proxy } = getCurrentInstance();

const form = ref({ fileList: [] });
const isReviewedRef = ref(null);
const open = ref(false);
const title = ref("");
const rules = ref({});

const activityName = ref("first");
function archiveFileId(val) {
  open.value = true;
  title.value = "报告发放";
}

function closedDialog(params) { }

onMounted(() => {
  nextTick(() => {
    isReviewedRef.value?.getTableHeight();
  });
});
onUpdated(() => {
  isReviewedRef.value?.getTableHeight();
});
</script>

<style></style>
